<?php
// brukes av chat.php
session_start();
if(isset($_SESSION['user'])){
$text = $_POST['text'];
$star = "";

if(isset($_SESSION['admin']))
$star = "&#9733;";



$fp = fopen("log.html", 'a');
fwrite($fp, "<div class='msgln'>(".date("d.m.y H:i:s").") <b><a href=profile.php?id=". $_SESSION['user'].">". $star . $_SESSION['user']." </a> </b>: ".stripslashes(htmlspecialchars($text))."<br></div>");
fclose($fp); //lukke fila
}







?>
